<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>RTE Instruction</title>
<link href="../edit68k.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1 class="heading">RTE Instruction<BR>
<hr noshade>
</h1>
<span class="text"><BR>
The instruction RTE (ReTurn from Exception) is used to put data in both the status register and the program counter with the same instruction. This instruction is necessary when an operating system that is working in supervisor mode must leave the control to an application in user mode. The new contents in the status register and the program counter is popped from the stack. First, a word is popped into the status register, then a longword is popped into the program counter. Thus, the stack pointer is increased by six. This instruction requires that the S bit is set in the status register when the instruction is executed. Since the status register is changed after the instruction, it's possible that the processor will be in user mode then.<BR>
        <BR>
ADDRESS METHODS: None<BR>
<BR>
DATA LENGTH: -<BR>
        <BR>
FLAGS: All flags are popped from the stack.<BR>
<BR>
SYNTAX: RTE<BR>

  
  </span>
</body>
</html>
